<template>

  <div class="aside" :style="{width:isCollapse?'65px':'200px', background:currentThemeColor }">
    <div class="system" :style="{fontSize:isCollapse?'12px':'20px', background:currentThemeColor }">{{!isCollapse?'个人记事系统':'记事'}}</div>
  
    <el-menu
     default-active="1"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#545c64"
      :collapse="isCollapse"
      text-color="#fff"
      active-text-color="#ffd04b">
       <el-menu-item index="1"  @click="$router.push('/home/users')">
        <i class="el-icon-s-claim"></i>
        <span slot="title">记事系统</span>
      </el-menu-item>
      <el-menu-item index="2" @click="$router.push('/home/emails')">
        <i class="el-icon-s-home"></i>
        <span slot="title">主页系统</span>
      </el-menu-item>
      <el-menu-item index="3" @click="$router.push('/home/orders')">
        <i class="el-icon-s-cooperation"></i>
        <span slot="title">日常信息</span>
      </el-menu-item>
       <el-menu-item index="4"  @click="$router.push('/home/rights')">
        <i class="el-icon-s-custom"></i>
        <span slot="title">相关联系人</span>
      </el-menu-item>
      
      <el-menu-item index="5"  @click="$router.push('/home/Analysis')">
        <i class="el-icon-s-data"></i>
        <span slot="title">数据分析</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
import bus from "../router/bus.js"
export default {
data() {
  return {
  isCollapse:true
  }
},

created(){
  bus.$on('share',val=>{
    this.isCollapse=val
  })
  }
}
</script>

<style>
.aside{
    background: #545c64;
    /* width: 200px; */
    height: 800px;
   
 
}
.system{
  color: #fff;
  margin: 15px  20px;
  /* font-weight: 24px; */
  border: 1px solid #fff;
  text-align: center;
  padding: 10px 5px;
  border-radius: 5px;
  
}
ul li{
  list-style: none;
  line-height: 40px;
  
}

ul li:hover{
  background: rgba(0, 0,0,0.3);
  color: #545c64;

}
.menu .menu-item a
{
 color: #fff;
}
.el-menu-vertical-demo{
  margin-top: 10px;
}
</style>